<!DOCTYPE html>
<html lang="zh">

<head>
    {% load static %}
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>查看员工信息页面</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/query_info.css' %}">
    {% comment %} <script type="text/javascript" src="{% static 'js/query_info.js' %}"></script> {% endcomment %}
    <script>
        function goto_index_page() {
            // 在当前页打开录入信息界面
            window.open("http://" + location.host + "/index/{{ user_name }}/", "_self");
        }
    </script>
</head>

<body>
    <header>
        <button id="goto_index" onclick="goto_index_page()">返回主页</button>
    </header>
    <main>
        <h1>查看员工信息</h1>
        <form id="employee_info_form" method="POST" action="../query_info/">
            {% csrf_token %}
            <div id="condition_div">
                <p style="display: inline-block">查询条件（姓名）：</p>
                <input type="text" name="query_name" id="query_name" style="display: inline-block">
            </div>
            <table>
                <tr>
                    <td class="attr">姓名</td>
                    <td><p class="table_value" id="name">{{ name }}</p></td>
                    <td class="attr">身份证号</td>
                    <td><p class="table_value" id="id_num">{{ id_num }}</p></td>
                </tr>
                <tr>
                    <td class="attr">性别</td>
                    <td><p class="table_value" id="sex">{{ sex }}</p></td>
                    <td class="attr">手机号</td>
                    <td><p class="table_value" id="telephone">{{ telephone }}</p></td>
                </tr>
                <tr>
                    <td class="attr">户口</td>
                    <td><p class="table_value" id="household">{{ household }}</p></td>
                    <td class="attr">家庭住址</td>
                    <td><p class="table_value" id="home_addr">{{ home_addr }}</p></td>
                </tr>
                <tr>
                    <td class="attr">职位</td>
                    <td><p class="table_value" id="post">{{ post }}</p></td>
                    <td class="attr">入职时间</td>
                    <td><p class="table_value" id="hire_date">{{ hire_date }}</p></td>
                </tr>
            </table>
            <input type="submit" value="查看" id="query_button">
        </form>
        <button id="export_button" hidden>导出</button>
    </main>
    <footer>
        <p>Copyright © 2021 zzll0909</p>
    </footer>
</body>

</html>